<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<fmt:setBundle basename="infomessages" var="info"/>
<%
	request.setAttribute("path", request.getContextPath());
%>
<script type="text/javascript">
function validateUserInfo(){
	$("#name").change(function (){
		check.emptyCheck("name");
	});
	
	$("#mobile").change(function (){
		check.mobile("mobile");
	});
	$("#phone").change(function (){
		check.phone("phone");
	});
	
	$("#age").change(function(){
		check.intNum("age");
	});
	
	$("#email").change(function(){
		check.email("email");
	});
	
}
function saveUser(){
	
/*  	if(!$("#imageId").val()){
		 alert("请先上传图片");
		 return false;
	}  */
	var isModify = $("#modifyFlag").val();
	var uri = "${root}/app/user/setting/modify";
	if(isModify == "true"){
		if( check.emptyCheck("name") & check.mobile("mobile")){
			common.ajaxSubmit(uri,"userForm","保存失败","",'common.reload("${root}/app/user/setting/${user.id}?loc=user_list&h=h01&n=n04")');
		}
	}
	
}

</script>
<form class="form-horizontal" id="userForm" role="form">
	<jsp:include page="../../base/token.jsp"/>
	<input type="hidden"  name="imageId" id="imageId" value="${user.imageId}" />
	<jsp:include page="user_base.jsp"></jsp:include>
</form>
<jsp:include page="user_img.jsp"></jsp:include>
<form class="form-horizontal">
	<div class="form-actions text-center">
      <button type="button" class="btn btn-success" onclick="saveUser()">保存</button>
    </div>
</form>
		

